package com.mayikt;

/**
 * @Author: maplefire
 * @Description: 匿名内部类创建线程
 * @Date: 2022/06/16 17:51
 */

public class ThreadDemo03 {
    public static void main(String[] args) {
        System.out.println("main...主线程开始");
        Thread t1 = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 1; i < 10; i++) {
                    System.out.println("子...i" + i);
                }
            }
        });
        t1.start();
        for (int i = 1; i < 10; i++) {
            System.out.println("main..." + i);

        }
        System.out.println("main... 主线程结束...");
    }
}
